package com.intellect.gfproto.junit;

import static org.junit.Assert.*;

import javax.naming.InitialContext;

import org.junit.Test;

import com.intellect.gfproto.HelloWorldService;

public class HelloWorldClient {
	HelloWorldService hwBean;
	
	@Test
	public void getBean() throws Exception {
		InitialContext ctx = new InitialContext();
		hwBean = (HelloWorldService) ctx.lookup("ejb/HelloWorldJNDI");
		String theName = hwBean.getTheName();
		System.out.println("Well hello there: " + theName + ".  I obtained you via EJB technology!!!");;
		assertNotNull(theName);
	}
}
